// 如果没有通过拦截器配置域名的话，可以在这里写上完整的URL(加上域名部分)

// let baseUrl = 'http://192.168.1.200:8005';
let baseUrl = 'https://gms.imguangguang.com/mocupv2';


const install = (Vue, vm) => {
	// collection-controller 收藏管理
	let addCollection = (params = {}) => vm.$u.post(baseUrl + '/collection-bean/addCollection', params);
	let delCollection = (params = {}) => vm.$u.post(baseUrl + '/collection-bean/delCollection', params);
	let findCollections = (params = {}) => vm.$u.post(baseUrl + '/collection-bean/findCollections', params);
	// coupon-controller 优惠券管理
	let exchangeCoupon = (params = {}) => vm.$u.post(baseUrl + '/coupon-bean/exchangeCoupon', params);
	let findCoupon = (params = {}) => vm.$u.post(baseUrl + '/coupon-bean/findCoupon', params);
	// dictionary-controller 字典管理
	let addDictionary = (params = {}) => vm.$u.post(baseUrl + '/dictionary-bean/addDictionary', params);
	let findDicByKey = (params = {}) => vm.$u.post(baseUrl + '/dictionary-bean/findDicByKey', params);
	let findDicByType = (params = {}) => vm.$u.post(baseUrl + '/dictionary-bean/findDicByType', params);
	// login-controller
	let exitLogin = (params = {}) => vm.$u.post(baseUrl + '/login-bean/exitLogin', params);
	let loginByPwd = (params = {}) => vm.$u.post(baseUrl + '/login-bean/loginByPwd', params);
	let loginByWechatPhone = (params = {}) => vm.$u.post(baseUrl + '/login-bean/loginByWechatPhone', params);
	// market-controller 商场管理
	let findMarket = (params = {}) => vm.$u.post(baseUrl + '/market-bean/findMarket', params);
	// report-controller 举报反馈管理
	let addReport = (params = {}) => vm.$u.post(baseUrl + '/report-bean/addReport', params);
	let dealReport = (params = {}) => vm.$u.post(baseUrl + '/report-bean/dealReport', params);
	let findMyReports = (params = {}) => vm.$u.post(baseUrl + '/report-bean/findMyReports', params);
	let findReports = (params = {}) => vm.$u.post(baseUrl + '/report-bean/findReports', params);
	// revenue-flow-controller 流水管理
	let findMyRevenue = (params = {}) => vm.$u.post(baseUrl + '/revenue-flow-bean/findMyRevenue', params);
	// stylist-level-controller 搭配师等级管理
	let getStylistLevels = (params = {}) => vm.$u.post(baseUrl + '/stylist-level-bean/getStylistLevels', params);
	// stylist-review-controller 搭配师管理
	let applyStylist = (params = {}) => vm.$u.post(baseUrl + '/stylist-review-bean/applyStylist', params);
	let editApply = (params = {}) => vm.$u.post(baseUrl + '/stylist-review-bean/editApply', params);
	let examineStylist = (params = {}) => vm.$u.post(baseUrl + '/stylist-review-bean/examineStylist', params);
	let myApplies = (params = {}) => vm.$u.post(baseUrl + '/stylist-review-bean/myApplies', params);
	// user-assets-controller 用户资产管理
	let getMyAssets = (params = {}) => vm.$u.post(baseUrl + '/user-assets-bean/getMyAssets', params);
	let withdrawal = (params = {}) => vm.$u.post(baseUrl + '/user-assets-bean/withdrawal', params);
	// user-controller 用户管理
	let changeListening = (params = {}) => vm.$u.post(baseUrl + '/user-bean/changeListening', params);
	let changeRole = (params = {}) => vm.$u.post(baseUrl + '/user-bean/changeRole', params);
	let editUser = (params = {}) => vm.$u.post(baseUrl + '/user-bean/editUser', params);
	let findUsers = (params = {}) => vm.$u.post(baseUrl + '/user-bean/findUsers', params);
	let getUser = (params = {}) => vm.$u.post(baseUrl + '/user-bean/getUser', params);
	let todayOrderAndIncome = (params = {}) => vm.$u.post(baseUrl + '/user-bean/todayOrderAndIncome', params);
	let getPostingQiniuToken = (params = {}) => vm.$u.post(baseUrl + '/user-bean/getPostingQiniuToken', params);
	let getUserByIm = (params = {}) => vm.$u.post(baseUrl + '/user-bean/getUserByIm', params);
	let secCheckUsing = (params = {}) => vm.$u.post(baseUrl + '/user-bean/secCheck', params);
	let createwxaqrcode = (params = {}) => vm.$u.post(baseUrl + '/user-bean/createwxaqrcode', params);
	// user-wear-controller 用户穿搭管理
	let editWearData = (params = {}) => vm.$u.post(baseUrl + '/user-wear-bean/editWearData', params);
	let getWearData = (params = {}) => vm.$u.post(baseUrl + '/user-wear-bean/getWearData', params);
	// wear-scheme-controller 穿搭方案管理
	let checkScheme = (params = {}) => vm.$u.post(baseUrl + '/wear-scheme-bean/checkScheme', params);
	let copyScheme = (params = {}) => vm.$u.post(baseUrl + '/wear-scheme-bean/copyScheme', params);
	let delScheme = (params = {}) => vm.$u.post(baseUrl + '/wear-scheme-bean/delScheme', params);
	let findNoFinishSchemes = (params = {}) => vm.$u.post(baseUrl + '/wear-scheme-bean/findNoFinishSchemes', params);
	let findSchemeById = (params = {}) => vm.$u.post(baseUrl + '/wear-scheme-bean/findSchemeById', params);
	let findSchemeByOrderId = (params = {}) => vm.$u.post(baseUrl + '/wear-scheme-bean/findSchemeByOrderId', params);
	let findSchemeByUserId = (params = {}) => vm.$u.post(baseUrl + '/wear-scheme-bean/findSchemeByUserId', params);
	let saveScheme = (params = {}) => vm.$u.post(baseUrl + '/wear-scheme-bean/saveScheme', params);
	let sendToFriend = (params = {}) => vm.$u.post(baseUrl + '/wear-scheme-bean/sendToFriend', params);
	let startMakeScheme = (params = {}) => vm.$u.post(baseUrl + '/wear-scheme-bean/startMakeScheme', params);
	// order-controller 订单管理
	let addPrice = (params = {}) => vm.$u.post(baseUrl + '/order-bean/addPrice', params);
	let bindPrivacyPhoneNum = (params = {}) => vm.$u.post(baseUrl + '/order-bean/bindPrivacyPhoneNum', params);
	let buyWearSchemeFromStyHome = (params = {}) => vm.$u.post(baseUrl + '/order-bean/buyWearSchemeFromStyHome', params);
	let cancelOrder = (params = {}) => vm.$u.post(baseUrl + '/order-bean/cancelOrder', params);
	let createOnLineOrder = (params = {}) => vm.$u.post(baseUrl + '/order-bean/createOnLineOrder', params);
	let createOrder = (params = {}) => vm.$u.post(baseUrl + '/order-bean/createOrder', params);
	let createWearSchemeOrder = (params = {}) => vm.$u.post(baseUrl + '/order-bean/createWearSchemeOrder', params);
	let delOrder = (params = {}) => vm.$u.post(baseUrl + '/order-bean/delOrder', params);
	let findAllOrder = (params = {}) => vm.$u.post(baseUrl + '/order-bean/findAllOrder', params);
	let findOrder = (params = {}) => vm.$u.post(baseUrl + '/order-bean/findOrder', params);
	let findOrderByNo = (params = {}) => vm.$u.post(baseUrl + '/order-bean/findOrderByNo', params);
	let finishOrder = (params = {}) => vm.$u.post(baseUrl + '/order-bean/finishOrder', params);
	let getPayParams = (params = {}) => vm.$u.post(baseUrl + '/order-bean/getPayParams', params);
	let receiveOrder = (params = {}) => vm.$u.post(baseUrl + '/order-bean/receiveOrder', params);
	let stylistSign = (params = {}) => vm.$u.post(baseUrl + '/order-bean/stylistSign', params);
	let findNearOrders = (params = {}) => vm.$u.post(baseUrl + '/order-bean/findNearOrders', params);
	let getMakingSchemeCount = (params = {}) => vm.$u.post(baseUrl + '/order-bean/getMakingSchemeCount', params);
	let getLastOrderWithImuser = (params = {}) => vm.$u.post(baseUrl + '/order-bean/getLastOrderWithImuser', params);
	// order-comment-controller 订单评论
	let addComment = (params = {}) => vm.$u.post(baseUrl + '/order-comment-bean/addComment', params);
	
	
	
	
	// 将各个定义的接口名称，统一放进对象挂载到vm.$u.api(因为vm就是this，也即this.$u.api)下
	vm.$u.api = {
		addCollection,
		delCollection,
		findCollections,
		addDictionary,
		findDicByKey,
		findDicByType,
		exitLogin,
		loginByPwd,
		loginByWechatPhone,
		findMarket,
		addReport,
		dealReport,
		findMyReports,
		findReports,
		findMyRevenue,
		getStylistLevels,
		applyStylist,
		editApply,
		examineStylist,
		myApplies,
		getMyAssets,
		changeListening,
		changeRole,
		editUser,
		findUsers,
		getUser,
		todayOrderAndIncome,
		editWearData,
		getWearData,
		checkScheme,
		copyScheme,
		delScheme,
		findNoFinishSchemes,
		findSchemeById,
		findSchemeByOrderId,
		findSchemeByUserId,
		saveScheme,
		sendToFriend,
		startMakeScheme,
		exchangeCoupon,
		findCoupon,
		addComment,
		bindPrivacyPhoneNum,
		cancelOrder,
		createOnLineOrder,
		createOrder,
		createWearSchemeOrder,
		delOrder,
		findAllOrder,
		findOrder,
		findOrderByNo,
		stylistSign,
		finishOrder,
		getPayParams,
		receiveOrder,
		getPostingQiniuToken,
		getUserByIm,
		findNearOrders,
		buyWearSchemeFromStyHome,
		getMakingSchemeCount,
		getLastOrderWithImuser,
		secCheckUsing,
		addPrice,
		createwxaqrcode
	};
}

export default {
	install
}
